fix(TOOLS): declare graphology deps for MemoryGraph.ts#1407
Closed
Luo0oo wants to merge 1 commit into
Closed
Conversation
MemoryGraph.ts imports graphology, graphology-communities-louvain, and graphology-metrics but no package.json in the repo declares them, so fresh installers hit 'Cannot find module graphology' the first time they run: bun ~/.claude/LIFEOS/TOOLS/MemoryGraph.ts build Adds a parent-directory package.json at LifeOS/install/LifeOS/TOOLS/ so Bun's module resolver walks up and finds the deps. Sibling tool subdirs (TOOLS/llcli/, TOOLS/TokenXray/) keep their own scoped package.json; scripts sitting at TOOLS/ root inherit from here. Deliberate parent-scope location instead of moving MemoryGraph.ts into a TOOLS/MemoryGraph/ subdir — the move would break every existing consumer path including Pulse Observability's /api/memory/graph route and the install engine references.
Owner
|
Thanks a lot for this, @Luo0oo — really appreciate you flagging it and taking the time to write the fix. When I went back through the current source, this turns out to already be handled: graphology deps for MemoryGraph.ts are already declared in TOOLS/package.json in current source. The system has moved a fair bit since you opened this (the PAI → LifeOS rename and a few subsystem rewrites), so the gap you spotted has since been closed independently. Going to close this one out on that basis — but genuinely grateful for the contribution. 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
LifeOS/install/LifeOS/TOOLS/MemoryGraph.tsimports three npm packages that are not declared in anypackage.jsonin the repo:find LifeOS/install -name package.json | xargs grep -l graphologyreturns nothing. Fresh installers hitCannot find module 'graphology'the first time they invokebun ~/.claude/LIFEOS/TOOLS/MemoryGraph.ts build, which silently breaks Pulse's/api/memory/graphroute (returns emptygraph.jsonwith the "run: bun LIFEOS/TOOLS/MemoryGraph.ts build --all" hint that then also fails).Fix
Adds
LifeOS/install/LifeOS/TOOLS/package.jsondeclaring the 3 direct deps with^caret ranges (matching the house style used by sibling manifests likeTOOLS/TokenXray/package.jsonandPULSE/Observability/package.json).Uses parent-directory scope deliberately, rather than moving
MemoryGraph.tsinto aTOOLS/MemoryGraph/subdir to match the exact sibling pattern ofTOOLS/llcli/andTOOLS/TokenXray/. Moving the file would break every existing consumer path:LifeOS/install/LifeOS/PULSE/Observability/observability.ts→handleMemoryGraphApi()readsMEMORY/GRAPH/graph.jsonbuilt by this exact pathPULSE/modules/user-index.tsreferencesLIFEOS_INSTALL/engine/detect.ts+actions.tsinstall-time refsDeliberate deviation is documented in the manifest's
descriptionfield.Reproducer
After this PR, adds
bun installinLIFEOS/TOOLS/(or bun resolves via the parent walk) and the build succeeds.Verify
cd LifeOS/install/LifeOS/TOOLS && bun install && bun MemoryGraph.ts buildsucceeds.